﻿using System.Collections.Generic;

public class WaveModelNull : WaveModel
{
    public override float getWaveHeight()
    {
        return 0;
    }

    public override bool hasWave()
    {
        return false;
    }
}

public class WaveModel
{
    private Stack<float> waveValues;
    
    public virtual float getWaveHeight()
    {
        return -waveValues.Pop();
    }

    public virtual bool hasWave()
    {
        return waveValues.Count != 0;
    }

    public void setWaveValues(Stack<float> _waveValues)
    {
        waveValues = _waveValues;
    }

    private int getCountWave()
    {
        return waveValues.Count;
    }
}
